<?php echo $header; ?>
<div id="content"><?php echo $content_top; ?>
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>

    <div style="font-size: 22px;line-height: 36px;">我的余额<span class="unit">¥</span><span class="price-number"><?php echo $balance;?></span></div>
    <?php if(isset($recharge_success)){ ?>
        <div class="popup_block">
            正在充值，请等待<span id="mes">5</span>s。
        </div>
        <script type="text/javascript">
            var i = 5;
            var intervalid;
            intervalid = setInterval("fun()", 1000);
            function fun() {
                if (i == 0) {
                    window.location.href = "index.php?route=account/recharge";
                    clearInterval(intervalid);
                }
                document.getElementById("mes").innerHTML = i;
                i--;
            }
        </script>
    <?php }?>

    <ul class="content-tab" id="tabs">
        <li class="current"><a href="#tab-online" >线上充值</a></li>
        <li><a href="#tab-bank" >银行转账</a></li>
        <li><a href="#tab-code">充值券</a></li>
    </ul>

    <div id="tabs">

</div>

    <div id="tab-bank" class="tab-content">
        <table class="table table-hover table-bordered"><thead><tr><th>开户银行</th><th>账户名称</th><th>账号</th></tr></thead><tbody><tr><td>中国民生银行股份有限公司北京亚运村支行</td><td>北京寄云鼎城科技有限公司</td><td><span class="card-number">691444252</span></td></tr></tbody></table>
    </div>
    <div id="tab-online" class="tab-content recharge">
        <form target="_blank" method="post"  action="<?php echo $online_action;?>" class="form form-horizontal">
            <div class="item error"><span></span></div>
            <div class="item">
                <div class="control-label">总额 (¥)</div><div class="controls"><input type="text" value="10" name="amount" class="fee"><span class="help-inline error-message" style="display: none;">单笔充值金额最少 ¥ 10，若充值金额大于 ¥ 10000请使用<a data-method="bank" href="#" class="recharge-method">银行转账</a></span><span class="none help-inline">提示：若充值过程中遇到<a target="_blank" href="http://help.alipay.com/lab/help_detail.htm?help_id=247928">交易限额</a>问题，请前往相应的网上银行进行调整后再继续。</span></div></div><div class="item alipay"><div class="control-label">支付方式</div><div class="controls pay-platforms"><ul><li><input type="radio" checked="" value="" name="bankcode" id="alipay"><label for="alipay" title="Alipay" class="pay_logo alipay"></label></li></ul></div></div><div class="item"><div class="controls banklist"><ul><li><input type="radio" value="BOCB2C" name="bankcode" id="BOCB2C"><label for="BOCB2C" title="中国银行" class="pay_logo BOCB2C"></label></li><li><input type="radio" value="ICBCB2C" name="bankcode" id="ICBCB2C"><label for="ICBCB2C" title="中国工商银行" class="pay_logo ICBCB2C"></label></li><li><input type="radio" value="CMB" name="bankcode" id="CMB"><label for="CMB" title="招商银行" class="pay_logo CMB"></label></li><li><input type="radio" value="CCB" name="bankcode" id="CCB"><label for="CCB" title="中国建设银行" class="pay_logo CCB"></label></li><li><input type="radio" value="ABC" name="bankcode" id="ABC"><label for="ABC" title="中国农业银行" class="pay_logo ABC"></label></li><li><input type="radio" value="SPDB" name="bankcode" id="SPDB"><label for="SPDB" title="上海浦东发展银行" class="pay_logo SPDB"></label></li><li><input type="radio" value="CIB" name="bankcode" id="CIB"><label for="CIB" title="兴业银行" class="pay_logo CIB"></label></li><li><input type="radio" value="GDB" name="bankcode" id="GDB"><label for="GDB" title="广东发展银行" class="pay_logo GDB"></label></li><li><input type="radio" value="SDB" name="bankcode" id="SDB"><label for="SDB" title="深圳发展银行" class="pay_logo SDB"></label></li><li><input type="radio" value="CMBC" name="bankcode" id="CMBC"><label for="CMBC" title="中国民生银行" class="pay_logo CMBC"></label></li><li><input type="radio" value="COMM" name="bankcode" id="COMM"><label for="COMM" title="交通银行" class="pay_logo COMM"></label></li><li><input type="radio" value="CITIC" name="bankcode" id="CITIC"><label for="CITIC" title="中信银行" class="pay_logo CITIC"></label></li><li><input type="radio" value="HZCBB2C" name="bankcode" id="HZCBB2C"><label for="HZCBB2C" title="杭州银行" class="pay_logo HZCBB2C"></label></li><li><input type="radio" value="CEBBANK" name="bankcode" id="CEBBANK"><label for="CEBBANK" title="中国光大银行" class="pay_logo CEBBANK"></label></li><li><input type="radio" value="SHBANK" name="bankcode" id="SHBANK"><label for="SHBANK" title="上海银行" class="pay_logo SHBANK"></label></li><li><input type="radio" value="NBBANK" name="bankcode" id="NBBANK"><label for="NBBANK" title="宁波银行" class="pay_logo NBBANK"></label></li><li><input type="radio" value="SPABANK" name="bankcode" id="SPABANK"><label for="SPABANK" title="平安银行" class="pay_logo SPABANK"></label></li><li><input type="radio" value="BJRCB" name="bankcode" id="BJRCB"><label for="BJRCB" title="北京农村商业银行" class="pay_logo BJRCB"></label></li><li><input type="radio" value="FDB" name="bankcode" id="FDB"><label for="FDB" title="富滇银行" class="pay_logo FDB"></label></li></ul></div></div><div class="paypal-form"></div><div class="form-actions"><input type="submit" value="充值" class="btn btn-primary"></div></form>
    </div>
    <div id="tab-code" class="tab-content">
        <form action="" method="post" enctype="multipart/form-data">
            <h2>充值券充值</h2>
            <div class="content">
                <table class="form">
                    <tr>
                        <td><span class="required">*</span> 输入充值券</td>
                        <td><input type="text" name="recharge_code" value="<?php echo $recharge_code; ?>" />
                            <?php if ($error_recharge_code) { ?>
                            <span class="error"><?php echo $error_recharge_code; ?></span>
                            <?php } ?><input type="submit"  style="margin-left: 40px;" value="充值" class="button" /></td>
                    </tr>
                </table>
            </div>

        </form>
        <script type="text/javascript">
            $(function(){
                $('input[type=\'submit\']').click(function(){
                    $('.lightbox_block').show();
                });
                $('input[name=\'online_recharge\']').click(function(){

                    if(isNaN($('input[name=\'total\']').val())){
                        alert('请正确输入充值金额');
                        return false;
                    }
                    window.location.href="index.php?route=account/recharge/online&total="+$('input[name=\'total\']').val();
                });
            });
        </script>
    </div>



    <div class="lightbox_block" style="left: 50%; margin-left: -276.5px; z-index: 1002; position: absolute; top: 256px; margin-top: 0px; display: none;"><div class="deploy_form">

            <div class="modal-header">
                <button data-dismiss="modal" class="close close-x" type="button " aria-hidden="true" onclick="$('.lightbox_block').hide();"></button>
                <h3>等待支付</h3>
            </div>
            <div style="padding: 10px;">
                <p class="alert alert-info">请在新窗口中完成支付</p>
            </div>
            <div class="modal-footer ">
                <button class="btn close grey" data-dismiss="modal" aria-hidden="true" onclick="$('.lightbox_block').hide();">遇到问题?</button>
                <button type="button" class="btn green btn-primary "aria-hidden="true" onclick="$('.lightbox_block').hide();"><i class="icon-ok"></i>已支付</button>
            </div>
        </div>
    </div>


    <script type="text/javascript"><!--
        $('#tabs a').tabs();
        //--></script>
  <?php echo $content_bottom; ?></div>
<?php echo $footer; ?>